<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>欢迎页</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="stylesheet" href="assets/layui/xadmin/css/font.css">
    <link rel="stylesheet" href="assets/layui/xadmin/css/xadmin.css">
    <!-- <link rel="stylesheet" href="./css/theme5.css"> -->
    <script src="assets/layui/xadmin/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="assets/layui/xadmin/js/xadmin.js"></script>
    <script type="text/javascript" src="assets/jquery.min.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body ">
                    <blockquote class="layui-elem-quote">欢迎您：
                        <span class="x-red" id="user">test</span>！<span id="nowtime"></span>
                    </blockquote>
                </div>
            </div>
        </div>
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">数据统计</div>
                <div class="layui-card-body ">
                    <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
                        <li class="layui-col-md2 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>学生数</h3>
                                <p>
                                    <cite><span id="stunum">11</span></cite></p>
                            </a>
                        </li>
                        <li class="layui-col-md2 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>宿舍楼数</h3>
                                <p>
                                    <cite><span id="plotnum">11</span></cite></p>
                            </a>
                        </li>
                        <li class="layui-col-md2 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>宿舍数</h3>
                                <p>
                                    <cite><span id="dormnum">11</span></cite></p>
                            </a>
                        </li>
                        <li class="layui-col-md2 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>专业数</h3>
                                <p>
                                    <cite><span id="majornum">11</span></cite></p>
                            </a>
                        </li>
                        <li class="layui-col-md2 layui-col-xs6">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>班级数</h3>
                                <p>
                                    <cite><span id="classnum">11</span></cite></p>
                            </a>
                        </li>

                        <li class="layui-col-md2 layui-col-xs6 ">
                            <a href="javascript:;" class="x-admin-backlog-body">
                                <h3>系统管理员数</h3>
                                <p>
                                    <cite>1</cite></p>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">系统信息</div>
                <div class="layui-card-body ">
                    <table class="layui-table">
                        <tbody>
                        <tr>
                            <th>电子学院档案管理系统版本</th>
                            <td>1.0.0</td>
                        </tr>
                        <tr>
                            <th>服务器地址</th>
                            <td>127.0.0.1</td>
                        </tr>
                        <tr>
                            <th>操作系统</th>
                            <td>Windows 10</td>
                        </tr>
                        <tr>
                            <th>运行环境</th>
                            <td>Toncat 9</td>
                        </tr>
                        <tr>
                            <th>JAVA版本</th>
                            <td>1.8.0_121</td>
                        </tr>
                        <tr>
                            <th>MYSQL版本</th>
                            <td>5.5.53</td>
                        </tr>
                        <tr>
                            <th>执行时间限制</th>
                            <td>30s</td>
                        </tr>
                        <tr>
                            <th>剩余空间</th>
                            <td>86015.2M</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">开发团队</div>
                <div class="layui-card-body ">
                    <table class="layui-table">
                        <tbody>
                        <tr>
                            <th>版权所有</th>
                            <td>软件工程大作业团队
                            </td>
                        </tr>
                        <tr>
                            <th>开发者</th>
                            <td>胡冠中、胡忠尉、李双钰、刘淼尹</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <style id="welcome_style"></style>
        <div class="layui-col-md12">
            <blockquote class="layui-elem-quote layui-quote-nm">本系统由 软件工程大作业团队 提供技术支持。</blockquote>
        </div>
    </div>
</div>
</div>
</body>
<script>
    $.ajax({
        type: "post",
        contentType: "application/x-www-form-urlencoded",
        url: "/welcome",
        data: {},
        dataType: "json",
        success: function (data) {

            document.getElementById("stunum").innerHTML = data.number.stunum
            document.getElementById("dormnum").innerHTML = data.number.dormnum
            document.getElementById("plotnum").innerHTML = data.number.plotnum
            document.getElementById("majornum").innerHTML = data.number.majornum
            document.getElementById("classnum").innerHTML = data.number.classnum
            document.getElementById("user").innerHTML = data.user.userName
            document.getElementById("nowtime").innerHTML = new Date().toLocaleString()
        }
    });

</script>
</html>